package online.xuping.thousandsOfWorlds.core;

import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.setting.Setting;
import com.github.artbits.quickio.api.DB;
import com.github.artbits.quickio.core.QuickIO;
import online.xuping.center.ai.BaiduErrorCodeEnum;
import online.xuping.center.ai.BaiduTokenServiceImpl;
import online.xuping.center.ai.BaiduWenXinYiYanServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类描述:    .
 *
 * @author xuping
 * 创建时间:  [2023/10/25 08:44]
 */
@Service
public class WorldAiCodeService {

   private BaiduWenXinYiYanServiceImpl baiduWenXinYiYanService = new BaiduWenXinYiYanServiceImpl( );

    public String newMapName(String info){
        try {
            String q = " 为一个" + info + "的大陆,起几个名字.    ";
            String re = baiduWenXinYiYanService.chat(q);
            return re;
        } catch (Exception e) {
            throw BaiduErrorCodeEnum.AI_ERROR.exception();
        }
    }

}
